#include <stdio.h>
#define N 6
int main()
{
    int i,j,k,t;
    printf("The possible Latin Squares of order %d are :\n",N);
    for(j = 0;j < N;j++)
    {
        for(i = 0;i < N;i++)
        {
            t = (i + j)%N;
            for(k = 0;k < N;k++)
            {
                printf("%d ",(k+t)%N+1);
            }
            printf("\t");

        }
        printf("\n");
    }

    return 0;
}
//熊贤豪
